#!/bin/bash
cmds=( 
    "ros2 run ros1_bridge dynamic_bridge --bridge-all-1to2-topics"
    "ros2 launch hnurm_bringup tf_transformer.launch.py"

    #后视相机
    "ros2 launch usb_cam camera.launch.py"  
    #vision
    "ros2 launch hnurm_camera hnurm_camera.launch.py"
    "ros2 launch hnurm_detect hnurm_detect.launch.py"
    "ros2 launch hnurm_armor hnurm_armor.launch.py"
    #uart serial
    "ros2 launch hnurm_uart hnurm_uart.launch.py"
    #navigation
    "echo ' '|sudo -S docker run --rm --net host --env DISPLAY=\$DISPLAY --volume /tmp/.X11-unix:/tmp/.X11-unix --volume /dev:/dev --privileged livo2:latest bash -c 'source ~/.bashrc && roslaunch fast_livo maping_mid360.launch rviz:=0 img_en:=0'"
    "ros2 launch hnurm_bringup test.launch.py"
    "ros2 launch icp_registration icp.launch.py"
    "ros2 launch hnurm_navigation bringup_launch.py"
    
)
for cmd in "${cmds[@]}"
do
    echo Current CMD : "$cmd"
    gnome-terminal -- bash -c "cd $(pwd);source ~/ros-humble-ros1-bridge/install/local_setup.bash;source /home/rm/nav/install/setup.bash;$cmd;exec bash;"
    sleep 0.2 
done
